Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
Q is empty.
↳ QTRS
↳ Overlay + Local Confluence
Q restricted rewrite system:
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
Q is empty.
The TRS is overlay and locally confluent. By [19] we can switch to innermost.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
Q restricted rewrite system:
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
HALF(s(s(x))) → HALF(x)
EVEN(s(s(x))) → EVEN(x)
IF_TIMES(true, s(x), y) → PLUS(times(half(s(x)), y), times(half(s(x)), y))
TIMES(s(x), y) → EVEN(s(x))
IF_TIMES(false, s(x), y) → TIMES(x, y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
IF_TIMES(true, s(x), y) → HALF(s(x))
IF_TIMES(false, s(x), y) → PLUS(y, times(x, y))
PLUS(s(x), y) → PLUS(x, y)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
HALF(s(s(x))) → HALF(x)
EVEN(s(s(x))) → EVEN(x)
IF_TIMES(true, s(x), y) → PLUS(times(half(s(x)), y), times(half(s(x)), y))
TIMES(s(x), y) → EVEN(s(x))
IF_TIMES(false, s(x), y) → TIMES(x, y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
IF_TIMES(true, s(x), y) → HALF(s(x))
IF_TIMES(false, s(x), y) → PLUS(y, times(x, y))
PLUS(s(x), y) → PLUS(x, y)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 4 SCCs with 4 less nodes.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
PLUS(s(x), y) → PLUS(x, y)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
PLUS(s(x), y) → PLUS(x, y)
R is empty.
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
PLUS(s(x), y) → PLUS(x, y)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- PLUS(s(x), y) → PLUS(x, y)
The graph contains the following edges 1 > 1, 2 >= 2
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
HALF(s(s(x))) → HALF(x)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
HALF(s(s(x))) → HALF(x)
R is empty.
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
HALF(s(s(x))) → HALF(x)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- HALF(s(s(x))) → HALF(x)
The graph contains the following edges 1 > 1
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EVEN(s(s(x))) → EVEN(x)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EVEN(s(s(x))) → EVEN(x)
R is empty.
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPSizeChangeProof
↳ QDP
Q DP problem:
The TRS P consists of the following rules:
EVEN(s(s(x))) → EVEN(x)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem. From the DPs we obtained the following set of size-change graphs:
- EVEN(s(s(x))) → EVEN(x)
The graph contains the following edges 1 > 1
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
IF_TIMES(false, s(x), y) → TIMES(x, y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
The TRS R consists of the following rules:
even(0) → true
even(s(0)) → false
even(s(s(x))) → even(x)
half(0) → 0
half(s(s(x))) → s(half(x))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → if_times(even(s(x)), s(x), y)
if_times(true, s(x), y) → plus(times(half(s(x)), y), times(half(s(x)), y))
if_times(false, s(x), y) → plus(y, times(x, y))
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
As all Q-normal forms are R-normal forms we are in the innermost case. Hence, by the usable rules processor [15] we can delete all non-usable rules [17] from R.
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
IF_TIMES(false, s(x), y) → TIMES(x, y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
The TRS R consists of the following rules:
half(s(s(x))) → s(half(x))
half(0) → 0
even(s(0)) → false
even(s(s(x))) → even(x)
even(0) → true
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
We have to consider all minimal (P,Q,R)-chains.
We deleted the following terms from Q as each root-symbol of these terms does neither occur in P nor in R.
plus(0, x0)
plus(s(x0), x1)
times(0, x0)
times(s(x0), x1)
if_times(true, s(x0), x1)
if_times(false, s(x0), x1)
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
IF_TIMES(false, s(x), y) → TIMES(x, y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
The TRS R consists of the following rules:
half(s(s(x))) → s(half(x))
half(0) → 0
even(s(0)) → false
even(s(s(x))) → even(x)
even(0) → true
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
IF_TIMES(false, s(x), y) → TIMES(x, y)
The remaining pairs can at least be oriented weakly.
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
Used ordering: Polynomial interpretation [25]:
POL(0) = 0
POL(IF_TIMES(x1, x2, x3)) = x2
POL(TIMES(x1, x2)) = x1
POL(even(x1)) = 0
POL(false) = 0
POL(half(x1)) = x1
POL(s(x1)) = 1 + x1
POL(true) = 0
The following usable rules [17] were oriented:
half(s(s(x))) → s(half(x))
half(0) → 0
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
Q DP problem:
The TRS P consists of the following rules:
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
The TRS R consists of the following rules:
half(s(s(x))) → s(half(x))
half(0) → 0
even(s(0)) → false
even(s(s(x))) → even(x)
even(0) → true
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].
The following pairs can be oriented strictly and are deleted.
TIMES(s(x), y) → IF_TIMES(even(s(x)), s(x), y)
The remaining pairs can at least be oriented weakly.
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
Used ordering: Matrix interpretation [3]:
Non-tuple symbols:
Tuple symbols:
M( TIMES(x1, x2) ) = | 1 | + | | · | x1 | + | | · | x2 |
M( IF_TIMES(x1, ..., x3) ) = | 0 | + | | · | x1 | + | | · | x2 | + | | · | x3 |
Matrix type:
We used a basic matrix type which is not further parametrizeable.
As matrix orders are CE-compatible, we used usable rules w.r.t. argument filtering in the order.
The following usable rules [17] were oriented:
half(s(s(x))) → s(half(x))
half(0) → 0
↳ QTRS
↳ Overlay + Local Confluence
↳ QTRS
↳ DependencyPairsProof
↳ QDP
↳ DependencyGraphProof
↳ AND
↳ QDP
↳ QDP
↳ QDP
↳ QDP
↳ UsableRulesProof
↳ QDP
↳ QReductionProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ QDPOrderProof
↳ QDP
↳ DependencyGraphProof
Q DP problem:
The TRS P consists of the following rules:
IF_TIMES(true, s(x), y) → TIMES(half(s(x)), y)
The TRS R consists of the following rules:
half(s(s(x))) → s(half(x))
half(0) → 0
even(s(0)) → false
even(s(s(x))) → even(x)
even(0) → true
The set Q consists of the following terms:
even(0)
even(s(0))
even(s(s(x0)))
half(0)
half(s(s(x0)))
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.